<template>
  <el-dialog
    title="确认"
    :visible.sync="isShowDialog"
    width="25%"
    :before-close="handleClose"
  >
    <div class="tip">{{ message }}</div>
    <div slot="footer" class="dialog-footer">
      <el-button @click="close(0)">取 消</el-button>
      <el-button class="save-btn" @click="close(1)">确 定</el-button>
    </div>
  </el-dialog>
</template>

<script>
export default {
  name: "DialogMessage",
  props: {
    // 是否显示弹窗
    isShowDialog: {
      type: Boolean,
      default: false,
    },
    // 提示信息
    message: {
      type: String,
      default: "",
    },
  },
  data() {
    return {
      
    };
  },
  methods: {
    open() {
    },
    handleClose() {
      this.$emit("confirm", 0);
    },
    close(type) {
      this.$emit("confirm", type);
    },
  },
  created() {},
};
</script>
<style lang="scss" scoped>
.tip {
  text-align: center;
  font-family: "PingFangHK-Regular", "PingFang HK", sans-serif;
  font-weight: 400;
  font-style: normal;
  font-size: 16px;
  color: #666666;
}

.dialog-footer {
  display: flex;
  justify-content: center;
  //   margin-top: -20px;
  button {
    width: 100px;
    // height: 30px;
  }
  .save-btn {
    background-color: rgba(68, 42, 141, 1);
    color: #ffffff;
  }
}
</style>
